<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <title>用户信息</title>
    <!-- Bootstrap -->
    <link href="../static/bootstrap-3.3.7-dist/css/bootstrap.min.css" rel="stylesheet">
    <!-- jQuery (Bootstrap 的所有 JavaScript 插件都依赖 jQuery，所以必须放在前边) -->
    <script src="../static/bootstrap-3.3.7-dist/js/jquery-2.0.0.min.js"></script>
    <!-- 加载 Bootstrap 的所有 JavaScript 插件。你也可以根据需要只加载单个插件。 -->
    <script src="../static/bootstrap-3.3.7-dist/js/bootstrap.min.js"></script>
    <script>
        $(function () {
            $("#addBtn").click(function () {
                $("#addUserModal").modal({
                    show: true
                })
            })

            $("#addBtn1").click(function () {
                $("#addUserModal").modal({
                    show: true
                })
            })
        });
    </script>
    <style>

    </style>
</head>
<body>
<nav class="navbar navbar-inverse">
    <div class="container-fluid">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
                    data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="#">用户信息管理系统</a>
        </div>

        <ul class="nav navbar-nav navbar-right">
            <li><a href="#">欢迎<span class="text-danger">小明</span></a></li>
            <li class="dropdown">
                <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true"
                   aria-expanded="false">个人中心 <span class="caret"></span></a>
                <ul class="dropdown-menu">
                    <li><a href="#">个人信息</a></li>
                    <li><a href="#">修改密码</a></li>

                    <li role="separator" class="divider"></li>
                    <li><a href="#">个人消息</a></li>
                </ul>
            </li>
        </ul>
    </div><!-- /.navbar-collapse -->
    </div><!-- /.container-fluid -->
</nav>
<div class="container-fluid">
    <div class="row">
        <!--    左侧菜单栏-->
        <div class="col-sm-2">
            <div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
                <div class="panel panel-default">
                    <div class="panel-heading" role="tab" id="headingOne">
                        <h4 class="panel-title">
                            <a role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseOne"
                               aria-expanded="true" aria-controls="collapseOne">
                                <span class="glyphicon glyphicon-user"></span> 用户管理
                            </a>
                        </h4>
                    </div>
                    <div id="collapseOne" class="panel-collapse collapse i" role="tabpanel"
                         aria-labelledby="headingOne">
                        <div class="panel-body">
                            <!--                        https://v3.bootcss.com/components/#list-group-->
                            <ul class="list-group">
                                <li class="list-group-item"><a href="">用户列表</a></li>

                            </ul>
                        </div>
                    </div>
                </div>
                <div class="panel panel-default">
                    <div class="panel-heading" role="tab" id="headingTwo">
                        <h4 class="panel-title">
                            <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion"
                               href="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo">
                                <span class="glyphicon glyphicon-apple"></span> 系统管理
                            </a>
                        </h4>
                    </div>
                    <div id="collapseTwo" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingTwo">
                        <div class="panel-body">
                            <ul class="list-group">
                                <li class="list-group-item"><a href="">系统状态</a></li>
                                <li class="list-group-item"><a href="">数据备份</a></li>

                            </ul>
                        </div>
                    </div>
                </div>
                <div class="panel panel-default">
                    <div class="panel-heading" role="tab" id="headingThree">
                        <h4 class="panel-title">
                            <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion"
                               href="#collapseThree" aria-expanded="false" aria-controls="collapseThree">
                                <span class="glyphicon glyphicon-glass"></span> 用户管理
                            </a>
                        </h4>
                    </div>
                    <div id="collapseThree" class="panel-collapse collapse" role="tabpanel"
                         aria-labelledby="headingThree">
                        <div class="panel-body">
                            <ul class="list-group">
                                <li class="list-group-item"><a href="">用户列表</a></li>

                            </ul>
                        </div>
                    </div>
                </div>
            </div>

        </div>

        <!--    网页内容部分-->
        <div class="col-sm-10">
            <h3 style="margin-top: 0">用户管理</h3>
            <form class="form-inline text-center" style="margin-bottom: 10px">
                <div class="form-group">
                    <label for="exampleInputName2">Name</label>
                    <input type="text" class="form-control" id="exampleInputName2" placeholder="Jane Doe">
                </div>
                <div class="form-group">
                    <label for="exampleInputEmail2">Email</label>
                    <input type="email" class="form-control" id="exampleInputEmail2" placeholder="jane.doe@example.com">
                </div>
                <button type="submit" class="btn btn-default">Send invitation</button>
            </form>
            <div>

                <!-- Nav tabs -->
                <ul class="nav nav-tabs" role="tablist">
                    <li role="presentation" class="active">
                        <a href="#home" aria-controls="home" role="tab"
                           data-toggle="tab">用户列表</a></li>
                    <li role="presentation">
                        <a href="#userTab" aria-controls="userTab" role="tab"
                           data-toggle="tab">添加用户</a></li>
                    </li>
                </ul>

                <!-- Tab panes -->
                <div class="tab-content">
                    <div role="tabpanel" class="tab-pane active" id="home">
<!--                        面板就有边框-->
                        <div class="panel panel-default">
                            <div class="panel-body">
                                <ul class="list-unstyled" style="margin-top: 10px">
                                    <li>
                                        <button class="btn btn-success" id="addBtn">添加用户信息</button>
                                    </li>
                                </ul>
                                <table class="table table-bordered table-hover table-striped" style="margin-top: 10px">
                                    <tr>
                                        <th>学号</th>
                                        <th>姓名</th>
                                        <th>性别</th>
                                        <th>出生日期</th>
                                        <th>专业</th>
                                        <th>操作</th>
                                    </tr>
                                    <tr>
                                        <td>9</td>
                                        <td>阿Q</td>
                                        <td>男</td>
                                        <td>1988-8-8</td>
                                        <td>软件工程</td>
                                        <td>
                                            <a data-toggle="modal" data-target="#updateUserModal" class="btn btn-primary">修改</a>
                                            <a
                                                    href="" class="btn btn-danger">删除</a>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>9</td>
                                        <td>阿Q</td>
                                        <td>男</td>
                                        <td>1988-8-8</td>
                                        <td>软件工程</td>
                                        <td>
                                            <a data-toggle="modal" data-target="#updateUserModal" class="btn btn-primary">修改</a>
                                            <a
                                                    href="" class="btn btn-danger">删除</a>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>9</td>
                                        <td>阿Q</td>
                                        <td>男</td>
                                        <td>1988-8-8</td>
                                        <td>软件工程</td>
                                        <td>
                                            <a data-toggle="modal" data-target="#updateUserModal" class="btn btn-primary">修改</a>
                                            <a
                                                    href="" class="btn btn-danger">删除</a>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>9</td>
                                        <td>阿Q</td>
                                        <td>男</td>
                                        <td>1988-8-8</td>
                                        <td>软件工程</td>
                                        <td>
                                            <a data-toggle="modal" data-target="#updateUserModal" class="btn btn-primary">修改</a>
                                            <a
                                                    href="" class="btn btn-danger">删除</a>
                                        </td>
                                    </tr>

                                </table>


                                <div class="text-center">
                                    <nav aria-label="Page navigation">
                                        <ul class="pagination">
                                            <li class="disabled">
                                                <a href="#" aria-label="Previous">
                                                    <span aria-hidden="true">&laquo;</span>
                                                </a>
                                            </li>
                                            <li class="active"><a href="#">1</a></li>
                                            <li><a href="#">2</a></li>
                                            <li><a href="#">3</a></li>
                                            <li><a href="#">4</a></li>
                                            <li><a href="#">5</a></li>
                                            <li>
                                                <a href="#" aria-label="Next">
                                                    <span aria-hidden="true">&raquo;</span>
                                                </a>
                                            </li>
                                        </ul>
                                    </nav>
                                </div>
                            </div>
                        </div>
                        <div class="alert alert-success alert-dismissible" role="alert">
                            <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                            <strong>删除成功!</strong> 感谢上帝，数据删除成功.
                        </div>
                        <div class="alert alert-danger alert-dismissible" role="alert">
                            <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                            <strong>删除失败!</strong> java.lang.RuntimeException 删除数据无效.
                        </div>
                    </div>
                    <div role="tabpanel" class="tab-pane" id="userTab">
                        <div class="panel panel-default">
                            <div class="panel-body">
                                <div class="row">
                                    <div class="col-sm-8 col-sm-offset-2">
                                        <form>
                                            <div class="form-group">
                                                <label for="username">Username</label>
                                                <input type="text" class="form-control" id="username" placeholder="用户名">
                                            </div>

                                            <div class="form-group">
                                                <label for="userPassword">Password</label>
                                                <input type="password" class="form-control" id="userPassword" placeholder="密码">
                                            </div>
                                            <div class="form-group">
                                                <label for="Phone">Phone</label>
                                                <input type="email" class="form-control" id="phone" placeholder="手机号">
                                            </div>

                                            <button type="submit" class="btn btn-info btn-block">添加</button>
                                        </form>
                                    </div>
                                </div>

                            </div>
                        </div>
                    </div>

                </div>

            </div>
        </div>
    </div>
</div>


<!--添加用户的对话框-->
<div class="modal fade" id="addUserModal" tabindex="-1" role="dialog">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title">添加用户</h4>
            </div>
            <div class="modal-body">
                <form>
                    <div class="form-group">
                        <label for="exampleInputEmail1">Email address</label>
                        <input type="email" class="form-control" id="exampleInputEmail1" placeholder="Email">
                    </div>
                    <div class="form-group">
                        <label for="exampleInputPassword1">Password</label>
                        <input type="password" class="form-control" id="exampleInputPassword1" placeholder="Password">
                    </div>
                    <div class="form-group">
                        <label for="exampleInputFile">File input</label>
                        <input type="file" id="exampleInputFile">
                        <p class="help-block">Example block-level help text here.</p>
                    </div>
                    <div class="checkbox">
                        <label>
                            <input type="checkbox"> Check me out
                        </label>
                    </div>

                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary">确认添加</button>
                <button type="button" class="btn btn-default" data-dismiss="modal">取消添加</button>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
</div><!-- /.modal -->

<!--更新用户的对话框-->
<div class="modal fade" id="updateUserModal" tabindex="-1" role="dialog">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title">更新用户信息</h4>
            </div>
            <div class="modal-body">
                <form>
                    <div class="form-group">
                        <label for="exampleInputEmail1">Email address</label>
                        <input type="email" class="form-control" id="exampleInputEmail1" placeholder="Email">
                    </div>
                    <div class="form-group">
                        <label for="exampleInputPassword1">Password</label>
                        <input type="password" class="form-control" id="exampleInputPassword1" placeholder="Password">
                    </div>
                    <div class="form-group">
                        <label for="exampleInputFile">File input</label>
                        <input type="file" id="exampleInputFile">
                        <p class="help-block">Example block-level help text here.</p>
                    </div>
                    <div class="checkbox">
                        <label>
                            <input type="checkbox"> Check me out
                        </label>
                    </div>

                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary">确认修改</button>
                <button type="button" class="btn btn-default" data-dismiss="modal">取消修改</button>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
</div><!-- /.modal -->
</body>
</html>